package com.toogu.mazhangmen.ui.monitor;

import android.view.View;

import com.toogu.mazhangmen.bean.EquipmentsBean;
import com.toogu.mazhangmen.bean.QATypeBean;
import com.toogu.mazhangmen.ui.view.RadioGroupView;

import java.util.List;

public interface ControlContract {

    interface IView {
        void onCreate();//创建Activity的界面

        void onResume();

        void onPause();

        void onDestory();

        void setViewDelegate(Delegate delegate);//设置回调

       void setPerson(ControlContract.AccessOutRecordBean accessOutRecordBean);

        void showPay(ControlContract.TempRecord tempRecord);

        void showPersonImage(String url);
        interface Delegate {
            View.OnClickListener getControlListener();
            View.OnClickListener getTakePhoto();
            View.OnClickListener getPaySubmit();
            RadioGroupView.OnCheckedChangeListener getOnCheckedChangeListener();
        }

    }

    interface IModel {
        void onCreate();

        void onResume();

        void onPause();

        void onDestory();//用于切断网络链接等等

        void setModelDelegate(Delegate delegate);//设置回调

        void getTempRecord(String mobile,String projectId);

        void setPersonShow(String projectId,String doorId);

        void getQAType();

        interface Delegate {
            void onDataChanged(ControlContract.AccessOutRecordBean accessOutRecordBean);
            void showPay(ControlContract.TempRecord tempRecord);
            void showQA(List<QATypeBean> qaTypeBeanList);
        }
    }

    interface IPresenter {
        void onCreate(IView view, IModel model);

        void onResume();

        void onPause();

        void onDestory();//在Activity中调用，实现view和model的onDestory
    }

    public class AccessOutRecordBean {
        private String id;
        private String type;
        private String user_type;
        private String door_status;
        private String project_id;
        private String door_id;
        private String user_id;
        private String user_month_info_id;
        private String temporary_record_id;
        private Object month_record_id;
        private Object month_card_id;
        private String in_out_original_record_id;
        private String temporary_in_type;
        private Object deleted_at;
        private String created_at;
        private String updated_at;
        private String status_text;
        private UserMonthInfo user_month_info;
        private UserBean user;
        private String car_img;
        private String family_help;

        public  class UserBean {
            private String id;
            private String name;
            private String identification_url;
            private String mobile;

            public String getId() {
                return id;
            }

            public String getName() {
                return name;
            }

            public String getIdentification_url() {
                return identification_url;
            }

            public String getMobile() {
                return mobile;
            }
        }

        public  class UserMonthInfo{
            private String id;
            private String project_id;
            private String apply_month_user_id;
            private String end_at;
            private String status;
            private MonthCard monthCard;

            public String getId() {
                return id;
            }

            public String getProject_id() {
                return project_id;
            }

            public String getApply_month_user_id() {
                return apply_month_user_id;
            }

            public String getEnd_at() {
                return end_at;
            }

            public String getStatus() {
                return status;
            }

            public MonthCard getMonthCard() {
                if(monthCard==null) monthCard= new MonthCard();
                return monthCard;
            }
        }
        public  class MonthCard {
            private String id;
            private String power;

            public String getId() {
                return id;
            }

            public String getPower() {
                return power;
            }
        }

        public String getId() {
            return id;
        }

        public String getType() {
            return type;
        }

        public String getUser_type() {
            return user_type;
        }

        public String getDoor_status() {
            return door_status;
        }

        public String getProject_id() {
            return project_id;
        }

        public String getDoor_id() {
            return door_id;
        }

        public String getUser_id() {
            return user_id;
        }

        public String getUser_month_info_id() {
            return user_month_info_id;
        }

        public String getTemporary_record_id() {
            return temporary_record_id;
        }

        public Object getMonth_record_id() {
            return month_record_id;
        }

        public Object getMonth_card_id() {
            return month_card_id;
        }

        public String getIn_out_original_record_id() {
            return in_out_original_record_id;
        }

        public String getTemporary_in_type() {
            return temporary_in_type;
        }

        public Object getDeleted_at() {
            return deleted_at;
        }

        public String getCreated_at() {
            return created_at;
        }

        public String getUpdated_at() {
            return updated_at;
        }

        public String getStatus_text() {
            return status_text;
        }

        public UserMonthInfo getUser_month_info() {
            return user_month_info==null? new UserMonthInfo():user_month_info;
        }

        public UserBean getUser() {
            return user==null?new UserBean():user;
        }

        public String getCar_img() {
            return car_img;
        }

        public String getFamily_help() {
            return family_help;
        }
    }
    public class TempRecord {
        public String temporaryFee;
        public String message;
        public TemporaryRecord temporaryRecord;

        class TemporaryRecord {
            public String id;
        }
    }

}
